<template>
  <div>
    <h2></h2>
    <div class="content">

      <!--个人信息区域-->
      <div class="main-area personal-area">
        <!--头像-->
        <div>
          <img :src="$store.state.userImg" alt="头像">
        </div>
        <!--昵称-->
        <div>{{$store.state.userName}}</div>
        <!--个性签名-->
        <div>{{$store.state.userSignature}}</div>
        <!--社交账号链接-->
        <div>
          <ul>
            <li v-for="item in $store.state.socialAccount" :key="item.name">
              <a :href="item.href">
                社交{{item.name}}
              </a>
            </li>
          </ul>
        </div>
        <!--友情链接-->
        <div>
          <ul>
            <li v-for="item in $store.state.links" :key="item.name">
              <a :href="item.href">
                友链{{item.name}}
              </a>
            </li>
          </ul>
        </div>

      </div>

      <!--文章区域-->
      <div class="main-area article-area"  @click="toArticle">
        <h2>这是文章</h2>
        <!--这是标签-->
        <div>
          <ul>
            <li v-for="item in 2" :key="item + '标签'">
              标签{{item}}
            </li>
          </ul>
        </div>
        <!--分类-->
        <div>
          <ul>
            <li v-for="item in 2" :key="item + '分类'">
              分类{{item}}
            </li>
          </ul>
        </div>
        <!--最近文章-->
        <div>
          <ol>
            <li v-for="item in 2" :key="item + '最近文章'">
              最近文章{{item}}
            </li>
          </ol>
        </div>

      </div>

      <!--收藏区域-->
      <div class="main-area favorite-area" @click="toFavorite">
        <h2>我的收藏</h2>

      </div>

      <!--美文区域-->
      <div class="main-area essay-area" @click="toEssay">
        <h2>这是美文</h2>
        <p>美文内容</p>
      </div>

      <!--视频区域-->
      <div class="main-area video-area" @click="toVideo">
        <h2>这是视频区域</h2>
      </div>

      <!--音乐区域-->
      <div class="main-area music-area" @click="toMusic">
        <h2>音乐</h2>
        <div>
          <div>
            <!--<img class="musicCover" :src="src">-->
            <div>音乐信息</div>
          </div>
          <div class="musicButton">
            <div class="musicButtonItem musicButtonLeft">
              <div class="btn">&lt;</div>
            </div>
            <div class="musicButtonItem musicButtonCenter">
              <div class="btn">暂停</div>
            </div>
            <div class="musicButtonItem musicButtonRight">
              <div class="btn">&gt;</div>
            </div>
          </div>
        </div>
      </div>


    </div>


  </div>
</template>

<script>
  export default {
    name: "index",
    data() {
      return {
        src: require('@/assets/avatar.jpg')

      }
    },
    methods: {
      toArticle() {
        this.$router.push('/article')
      },
      toEssay() {
        this.$router.push('/essay')
      },
      toVideo() {
        this.$router.push('/video')
      },
      toMusic() {
        this.$router.push('/music')
      },
      toFavorite() {
        this.$router.push('/favorite')
      }
    }
  }
</script>

<style lang="less" scoped>
  img {
    width: 50px;
  }

  .content {
    height: 100vh;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-content: center;
  }
  .main-area {
    width: 200px;
    height: 200px;
    background: rgba(0,0,0,0.1);
  }

</style>